package com.example.data0306.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.data0306.Adapter.MineAdapter;
import com.example.data0306.R;
import com.example.data0306.base.BaseFragment;
import com.example.data0306.bean.MineBean;

public class MineFragment extends BaseFragment {
    private RecyclerView nRecyclerView;
    private MineAdapter nAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.view_main_01;
    }

    @Override
    protected int contentView() {
        return 0;
    }

    @Override
    protected void initView(View rootView) {
        nRecyclerView = rootView.findViewById(R.id.recyclerView);
    }

    @Override
    protected void initData() {
        nAdapter = new MineAdapter();
        nAdapter.addData(new MineBean("英雄联盟","326","总局数","51.7%","胜率","3","五杀","7","超神"));
        nAdapter.addData(new MineBean("云顶之弈","326","总局数","51.7%","胜率","3","五杀","7","超神"));


//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"ttttttttttt"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"asdfasdfafdadsfsadf"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"ttttttttttt"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"asdfasdfafdadsfsadf"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"ttttttttttt"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"asdfasdfafdadsfsadf"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"ttttttttttt"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"asdfasdfafdadsfsadf"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg,"ttttttttttt"));
//        nAdapter.addData(new NewsArticleBean(R.drawable.icon_navigation_head_info_bg02,"asdfasdfafdadsfsadf"));
    }

    @Override
    protected void bindData() {
        super.bindData();
        nRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        nRecyclerView.setAdapter(nAdapter);
    }

    @Override
    protected void bindEvent() {

    }
}
